package com.cyanite.playlv2.widget;

import com.cyanite.playlv2.R;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class PlaceCategoryImageAdapter extends BaseAdapter  {

      private String[] mCategories;
      private int[] mCategoryIds;
      private Context mContext;
      int mGalleryItemBackground;

     public PlaceCategoryImageAdapter(Context paramContext)    {
        String[] arrayOfString = new String[6];
        arrayOfString[0] = paramContext.getString(R.string.venue_category_venues);
        arrayOfString[1] = paramContext.getString(R.string.venue_category_shares);
        arrayOfString[2] = paramContext.getString(R.string.venue_category_shop);
        arrayOfString[3] = paramContext.getString(R.string.venue_category_food);
        arrayOfString[4] = paramContext.getString(R.string.venue_category_entertainment);
        arrayOfString[5] = paramContext.getString(R.string.venue_category_hotel);
        mCategories = arrayOfString;
        mContext = paramContext;
     }

     public int getCount() {
         return mCategories.length;
     }

     public int getDefaultSelection()  {
         return 1;
     }

     public Object getItem(int paramInt)   {
         return Integer.valueOf(mCategoryIds[paramInt]);
     }

     public long getItemId(int paramInt)   {
         return paramInt;
     }

     public int getSearchSelection()   {
         return 0;
     }

     public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)   {
          TextView localTextView = new TextView(mContext);
          String text = mCategories[paramInt];
          localTextView.setText(text);
          localTextView.setWidth(90);
          localTextView.setTextSize(18.0F);

          localTextView.setPadding(4, 8, 4, 8);
          localTextView.setGravity(17);
          localTextView.setTextAppearance(mContext, R.style.galleryText);
          Drawable localDrawable2 = mContext.getResources().getDrawable(R.drawable.gallery_item_background);
          localTextView.setBackgroundDrawable(localDrawable2);
          return localTextView;
     }
}
